#include "FunctionButton.h"
#include "MySqlite.h"

/*--------------------------密码登录功能-----------------------*/
passWord::passWord()
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    confirm = new QPushButton("确认",this);
    confirm->setFont(word);
    name_password_input = new QLabel("输入密码",this);
    name_password_input->setFont(word);
    name_password_origin = new QLabel("原密码",this);
    name_password_origin->setFont(word);
    name_password_new = new QLabel("新密码",this);
    name_password_new->setFont(word);
    name_password_confirm_again = new QLabel("再次确认",this);
    name_password_confirm_again->setFont(word);
    input_password = new QLineEdit(this);
    input_password->setFont(word);
    input_password->setEchoMode(QLineEdit::EchoMode::Password);
    change_password_origin = new QLineEdit(this);
    change_password_origin->setFont(word);
    change_password_new = new QLineEdit(this);
    change_password_new->setFont(word);
    change_password_new->setEchoMode(QLineEdit::EchoMode::Password);
    change_password_confirm_again = new QLineEdit(this);
    change_password_confirm_again->setFont(word);
    change_password_confirm_again->setEchoMode(QLineEdit::EchoMode::Password);

    g_layout->addWidget(name_password_input,0,0);
    g_layout->addWidget(input_password,0,1);
    g_layout->addWidget(name_password_origin,1,0);
    g_layout->addWidget(change_password_origin,1,1);
    g_layout->addWidget(name_password_new,2,0);
    g_layout->addWidget(change_password_new,2,1);
    g_layout->addWidget(name_password_confirm_again,3,0);
    g_layout->addWidget(change_password_confirm_again,3,1);
    g_layout->addWidget(confirm,4,1);
}

/*--------------------------库存管理功能-----------------------*/
addGoods::addGoods()    //入库
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("添加",this);
    confirm->setFont(word);
    goods_date = new QLabel("入库日期",this);
    goods_date->setFont(word);
    goods_name = new QLabel("名称",this);
    goods_name->setFont(word);
    goods_input_price = new QLabel("总价(元)",this);
    goods_input_price->setFont(word);
    goods_input_number = new QLabel("入库数量",this);
    goods_input_number->setFont(word);
    goods_unit = new QLabel("单位",this);
    goods_unit->setFont(word);
    goods_handler = new QLabel("经手人",this);
    goods_handler->setFont(word);
    goods_produce_date = new QLabel("生产日期",this);
    goods_produce_date->setFont(word);
    goods_valid_date = new QLabel("有效日期",this);
    goods_valid_date->setFont(word);
    goods_remark = new QLabel("备注",this);
    goods_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    name = new QLineEdit(this);
    name->setFont(word);
    input_price = new QDoubleSpinBox(this);
    input_price->setFont(word);
    input_price->setDecimals(2);
    input_price->setRange(0,99999);
    input_number = new QDoubleSpinBox(this);
    input_number->setFont(word);
    input_number->setDecimals(1);
    input_number->setRange(0,99999);
    unit = new QLineEdit(this);
    unit->setFont(word);
    produce_date = new QLineEdit(QDate::currentDate().toString("yyyy-MM-dd"),this);
    produce_date->setFont(word);
    valid_date = new QLineEdit(QDate::currentDate().toString("yyyy-MM-dd"),this);
    valid_date->setFont(word);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件
    g_layout->addWidget(goods_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(goods_name,1,0);
    g_layout->addWidget(name,1,1);
    g_layout->addWidget(goods_input_number,2,0);
    g_layout->addWidget(input_number,2,1);
    g_layout->addWidget(goods_input_price,3,0);
    g_layout->addWidget(input_price,3,1);
    g_layout->addWidget(goods_unit,4,0);
    g_layout->addWidget(unit,4,1);
    g_layout->addWidget(goods_produce_date,5,0);
    g_layout->addWidget(produce_date,5,1);
    g_layout->addWidget(goods_valid_date,6,0);
    g_layout->addWidget(valid_date,6,1);
    g_layout->addWidget(goods_handler,7,0);
    g_layout->addWidget(handler,7,1);
    g_layout->addWidget(goods_remark,8,0);
    g_layout->addWidget(remark,8,1);
    g_layout->addWidget(confirm,9,1);
}

fetchGoods::fetchGoods()    //出库
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("取出",this);
    confirm->setFont(word);
    goods_date = new QLabel("出库日期",this);
    goods_date->setFont(word);
    goods_name = new QLabel("名称",this);
    goods_name->setFont(word);
    goods_output_number = new QLabel("出库数量",this);
    goods_output_number->setFont(word);
    goods_output_uint_price = new QLabel("卖出单价(元)",this);
    goods_output_uint_price->setFont(word);
    goods_unit = new QLabel("单位",this);
    goods_unit->setFont(word);
    goods_handler = new QLabel("经手人",this);
    goods_handler->setFont(word);
    goods_remark = new QLabel("备注",this);
    goods_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    name = new QLineEdit(this);
    name->setFont(word);
    output_number = new QDoubleSpinBox(this);
    output_number->setFont(word);
    output_number->setDecimals(1);
    output_number->setRange(0,99999);
    output_uint_price = new QDoubleSpinBox(this);
    output_uint_price->setFont(word);
    output_uint_price->setRange(0,99999);
    unit = new QLineEdit(this);
    unit->setFont(word);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件
    g_layout->addWidget(goods_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(goods_name,1,0);
    g_layout->addWidget(name,1,1);
    g_layout->addWidget(goods_output_number,2,0);
    g_layout->addWidget(output_number,2,1);
    g_layout->addWidget(goods_output_uint_price,3,0);
    g_layout->addWidget(output_uint_price,3,1);
    g_layout->addWidget(goods_unit,4,0);
    g_layout->addWidget(unit,4,1);
    g_layout->addWidget(goods_handler,5,0);
    g_layout->addWidget(handler,5,1);
    g_layout->addWidget(goods_remark,6,0);
    g_layout->addWidget(remark,6,1);
    g_layout->addWidget(confirm,7,1);
}

modifyGoods::modifyGoods()  //修改
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("修改",this);
    confirm->setFont(word);
    goods_date = new QLabel("出入库日期",this);
    goods_date->setFont(word);
    goods_name = new QLabel("名称",this);
    goods_name->setFont(word);
    goods_input_number = new QLabel("入库数量",this);
    goods_input_number->setFont(word);
    goods_input_unit_price = new QLabel("买入单价(元)",this);
    goods_input_unit_price->setFont(word);
    goods_input_price = new QLabel("买入总价(元)",this);
    goods_input_price->setFont(word);
    goods_output_number = new QLabel("出库数量",this);
    goods_output_number->setFont(word);
    goods_output_unit_price = new QLabel("卖出单价(元)",this);
    goods_output_unit_price->setFont(word);
    goods_output_price = new QLabel("卖出总价(元)",this);
    goods_output_price->setFont(word);
    goods_unit = new QLabel("单位",this);
    goods_unit->setFont(word);
    goods_produce_date = new QLabel("生产日期",this);
    goods_produce_date->setFont(word);
    goods_valid_date = new QLabel("有效日期",this);
    goods_valid_date->setFont(word);
    goods_handler = new QLabel("经手人",this);
    goods_handler->setFont(word);
    goods_remark = new QLabel("备注",this);
    goods_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    name = new QLineEdit(this);
    name->setFont(word);
    input_number = new QDoubleSpinBox(this);
    input_number->setFont(word);
    input_number->setDecimals(1);
    input_number->setRange(0,99999);
    input_unit_price = new QDoubleSpinBox(this);
    input_unit_price->setFont(word);
    input_unit_price->setDecimals(2);
    input_unit_price->setRange(0,99999);
    input_price = new QDoubleSpinBox(this);
    input_price->setFont(word);
    input_price->setDecimals(2);
    input_price->setRange(0,99999);
    output_number = new QDoubleSpinBox(this);
    output_number->setFont(word);
    output_number->setDecimals(1);
    output_number->setRange(0,99999);
    output_unit_price = new QDoubleSpinBox(this);
    output_unit_price->setFont(word);
    output_unit_price->setDecimals(2);
    output_unit_price->setRange(0,99999);
    output_price = new QDoubleSpinBox(this);
    output_price->setFont(word);
    output_price->setDecimals(2);
    output_price->setRange(0,99999);
    unit = new QLineEdit(this);
    unit->setFont(word);
    produce_date = new QLineEdit(QDate::currentDate().toString("yyyy-MM-dd"),this);
    produce_date->setFont(word);
    valid_date = new QLineEdit(QDate::currentDate().toString("yyyy-MM-dd"),this);
    valid_date->setFont(word);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件

    g_layout->addWidget(goods_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(goods_name,1,0);
    g_layout->addWidget(name,1,1);
    g_layout->addWidget(goods_input_number,2,0);
    g_layout->addWidget(input_number,2,1);
    g_layout->addWidget(goods_input_unit_price,3,0);
    g_layout->addWidget(input_unit_price,3,1);
    g_layout->addWidget(goods_input_price,4,0);
    g_layout->addWidget(input_price,4,1);
    g_layout->addWidget(goods_output_number,5,0);
    g_layout->addWidget(output_number,5,1);
    g_layout->addWidget(goods_output_unit_price,6,0);
    g_layout->addWidget(output_unit_price,6,1);
    g_layout->addWidget(goods_output_price,7,0);
    g_layout->addWidget(output_price,7,1);
    g_layout->addWidget(goods_unit,8,0);
    g_layout->addWidget(unit,8,1);
    g_layout->addWidget(goods_produce_date,9,0);
    g_layout->addWidget(produce_date,9,1);
    g_layout->addWidget(goods_valid_date,10,0);
    g_layout->addWidget(valid_date,10,1);
    g_layout->addWidget(goods_handler,11,0);
    g_layout->addWidget(handler,11,1);
    g_layout->addWidget(goods_remark,12,0);
    g_layout->addWidget(remark,12,1);
    g_layout->addWidget(confirm,13,1);
}

deleteGoods::deleteGoods()
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("删除",this);
    confirm->setFont(word);
    goods_date_title = new QLabel("出入库日期: ",this);
    goods_date_title->setFont(word);
    goods_name_title = new QLabel("名称: ",this);
    goods_name_title->setFont(word);
    goods_input_number_title = new QLabel("入库数量: ",this);
    goods_input_number_title->setFont(word);
    goods_input_unit_price_title = new QLabel("买入单价(元): ",this);
    goods_input_unit_price_title->setFont(word);
    goods_input_price_title = new QLabel("买入总价(元): ",this);
    goods_input_price_title->setFont(word);
    goods_output_number_title = new QLabel("出库数量: ",this);
    goods_output_number_title->setFont(word);
    goods_output_unit_price_title = new QLabel("卖出单价(元): ",this);
    goods_output_unit_price_title->setFont(word);
    goods_output_price_title = new QLabel("卖出总价(元): ",this);
    goods_output_price_title->setFont(word);
    goods_unit_title = new QLabel("单位: ",this);
    goods_unit_title->setFont(word);
    goods_produce_date_title = new QLabel("生产日期: ",this);
    goods_produce_date_title->setFont(word);
    goods_valid_date_title = new QLabel("有效日期: ",this);
    goods_valid_date_title->setFont(word);
    goods_handler_title = new QLabel("经手人: ",this);
    goods_handler_title->setFont(word);
    goods_remark_title = new QLabel("备注: ",this);
    goods_remark_title->setFont(word);
    goods_date = new QLabel(this);
    goods_date->setFont(word);
    goods_name = new QLabel(this);
    goods_name->setFont(word);
    goods_input_number = new QLabel(this);
    goods_input_number->setFont(word);
    goods_input_unit_price = new QLabel(this);
    goods_input_unit_price->setFont(word);
    goods_input_price = new QLabel(this);
    goods_input_price->setFont(word);
    goods_output_number = new QLabel(this);
    goods_output_number->setFont(word);
    goods_output_unit_price = new QLabel(this);
    goods_output_unit_price->setFont(word);
    goods_output_price = new QLabel(this);
    goods_output_price->setFont(word);
    goods_unit = new QLabel(this);
    goods_unit->setFont(word);
    goods_produce_date = new QLabel(this);
    goods_produce_date->setFont(word);
    goods_valid_date = new QLabel(this);
    goods_valid_date->setFont(word);
    goods_handler = new QLabel(this);
    goods_handler->setFont(word);
    goods_remark = new QLabel(this);
    goods_remark->setFont(word);

    g_layout->addWidget(goods_date_title,0,0);
    g_layout->addWidget(goods_date,0,1);
    g_layout->addWidget(goods_name_title,1,0);
    g_layout->addWidget(goods_name,1,1);
    g_layout->addWidget(goods_input_number_title,2,0);
    g_layout->addWidget(goods_input_number,2,1);
    g_layout->addWidget(goods_input_unit_price_title,3,0);
    g_layout->addWidget(goods_input_unit_price,3,1);
    g_layout->addWidget(goods_input_price_title,4,0);
    g_layout->addWidget(goods_input_price,4,1);
    g_layout->addWidget(goods_output_number_title,5,0);
    g_layout->addWidget(goods_output_number,5,1);
    g_layout->addWidget(goods_output_unit_price_title,6,0);
    g_layout->addWidget(goods_output_unit_price,6,1);
    g_layout->addWidget(goods_output_price_title,7,0);
    g_layout->addWidget(goods_output_price,7,1);
    g_layout->addWidget(goods_unit_title,8,0);
    g_layout->addWidget(goods_unit,8,1);
    g_layout->addWidget(goods_produce_date_title,9,0);
    g_layout->addWidget(goods_produce_date,9,1);
    g_layout->addWidget(goods_valid_date_title,10,0);
    g_layout->addWidget(goods_valid_date,10,1);
    g_layout->addWidget(goods_handler_title,11,0);
    g_layout->addWidget(goods_handler,11,1);
    g_layout->addWidget(goods_remark_title,12,0);
    g_layout->addWidget(goods_remark,12,1);
    g_layout->addWidget(confirm,13,1);
}

/*--------------------------收支管理功能-----------------------*/
addExpendMoney::addExpendMoney()    //支出
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("确认",this);
    confirm->setFont(word);
    money_date = new QLabel("日期",this);
    money_date->setFont(word);
    money_amount = new QLabel("数量",this);
    money_amount->setFont(word);
    money_pay_name = new QLabel("支出项目",this);
    money_pay_name->setFont(word);
    money_pay_money = new QLabel("支出总额",this);
    money_pay_money->setFont(word);
    money_handler = new QLabel("经手人",this);
    money_handler->setFont(word);
    money_remark = new QLabel("备注",this);
    money_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    amount = new QDoubleSpinBox(this);
    amount->setFont(word);
    amount->setRange(1,99999);
    pay_name = new QLineEdit(this);
    pay_name->setFont(word);
    pay_money = new QDoubleSpinBox(this);
    pay_money->setFont(word);
    pay_money->setDecimals(2);
    pay_money->setRange(0,99999);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件
    g_layout->addWidget(money_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(money_amount,1,0);
    g_layout->addWidget(amount,1,1);
    g_layout->addWidget(money_pay_name,2,0);
    g_layout->addWidget(pay_name,2,1);
    g_layout->addWidget(money_pay_money,3,0);
    g_layout->addWidget(pay_money,3,1);
    g_layout->addWidget(money_handler,4,0);
    g_layout->addWidget(handler,4,1);
    g_layout->addWidget(money_remark,5,0);
    g_layout->addWidget(remark,5,1);
    g_layout->addWidget(confirm,6,1);
}

addIncomeMoney::addIncomeMoney()    //收入
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("确认",this);
    confirm->setFont(word);
    money_date = new QLabel("日期",this);
    money_date->setFont(word);
    money_amount = new QLabel("数量",this);
    money_amount->setFont(word);
    money_income_name = new QLabel("收入项目",this);
    money_income_name->setFont(word);
    money_income_unit_money = new QLabel("收入单额",this);
    money_income_unit_money->setFont(word);
    money_handler = new QLabel("经手人",this);
    money_handler->setFont(word);
    money_remark = new QLabel("备注",this);
    money_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    amount = new QDoubleSpinBox(this);
    amount->setFont(word);
    amount->setRange(1,99999);
    income_name = new QLineEdit(this);
    income_name->setFont(word);
    income_unit_moeny = new QDoubleSpinBox(this);
    income_unit_moeny->setFont(word);
    income_unit_moeny->setDecimals(2);
    income_unit_moeny->setRange(0,99999);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件
    g_layout->addWidget(money_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(money_amount,1,0);
    g_layout->addWidget(amount,1,1);
    g_layout->addWidget(money_income_name,2,0);
    g_layout->addWidget(income_name,2,1);
    g_layout->addWidget(money_income_unit_money,3,0);
    g_layout->addWidget(income_unit_moeny,3,1);
    g_layout->addWidget(money_handler,4,0);
    g_layout->addWidget(handler,4,1);
    g_layout->addWidget(money_remark,5,0);
    g_layout->addWidget(remark,5,1);
    g_layout->addWidget(confirm,6,1);
}

modifyMoney::modifyMoney()  //修改
{
    QFont word("Song",11);
    g_layout = new QGridLayout(this);
    h_layout = new QHBoxLayout(this);
    confirm = new QPushButton("确认",this);
    confirm->setFont(word);
    money_date = new QLabel("日期",this);
    money_date->setFont(word);
    money_amount = new QLabel("数量",this);
    money_amount->setFont(word);
    money_pay_name = new QLabel("支出项目",this);
    money_pay_name->setFont(word);
    money_pay_money = new QLabel("支出总额",this);
    money_pay_money->setFont(word);
    money_income_name = new QLabel("收入项目",this);
    money_income_name->setFont(word);
    money_income_unit_money = new QLabel("收入单额",this);
    money_income_unit_money->setFont(word);
    money_handler = new QLabel("经手人",this);
    money_handler->setFont(word);
    money_remark = new QLabel("备注",this);
    money_remark->setFont(word);
    int year = QDate::currentDate().toString("yyyy").toInt();
    int month = QDate::currentDate().toString("MM").toInt();
    int day = QDate::currentDate().toString("dd").toInt();
    date_year = new QSpinBox(this);
    date_year->setFont(word);
    date_year->setRange(2023,2100);
    date_year->setValue(year);
    date_month = new QSpinBox(this);
    date_month->setFont(word);
    date_month->setRange(1,12);
    date_month->setValue(month);
    date_day = new QSpinBox(this);
    date_day->setFont(word);
    date_day->setRange(1,31);
    date_day->setValue(day);
    amount = new QDoubleSpinBox(this);
    amount->setFont(word);
    amount->setRange(1,99999);
    pay_name = new QLineEdit(this);
    pay_name->setFont(word);
    pay_money = new QDoubleSpinBox(this);
    pay_money->setFont(word);
    pay_money->setDecimals(2);
    pay_money->setRange(0,99999);
    income_name = new QLineEdit(this);
    income_name->setFont(word);
    income_unit_money = new QDoubleSpinBox(this);
    income_unit_money->setFont(word);
    income_unit_money->setDecimals(2);
    income_unit_money->setRange(0,99999);
    handler = new QComboBox(this);
    handler->setFont(word);
    remark = new QLineEdit(this);
    remark->setFont(word);
    //填写ComboBox内容
    QStringList handler_names;
    handler_names<<""<<"何丽群"<<"蓝秋梅";
    handler->addItems(handler_names);
    //组合控件
    g_layout->addWidget(money_date,0,0);
    h_layout->addWidget(date_year,0);
    h_layout->addWidget(date_month,1);
    h_layout->addWidget(date_day,2);
    g_layout->addLayout(h_layout,0,1);
    g_layout->addWidget(money_amount,1,0);
    g_layout->addWidget(amount,1,1);
    g_layout->addWidget(money_pay_name,2,0);
    g_layout->addWidget(pay_name,2,1);
    g_layout->addWidget(money_pay_money,3,0);
    g_layout->addWidget(pay_money,3,1);
    g_layout->addWidget(money_income_name,4,0);
    g_layout->addWidget(income_name,4,1);
    g_layout->addWidget(money_income_unit_money,5,0);
    g_layout->addWidget(income_unit_money,5,1);
    g_layout->addWidget(money_handler,6,0);
    g_layout->addWidget(handler,6,1);
    g_layout->addWidget(money_remark,7,0);
    g_layout->addWidget(remark,7,1);
    g_layout->addWidget(confirm,8,1);
}


